package com.ludomancy.archeologyrpg;

import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.KeyEvent;
import com.ludomancy.gamelib.Button;
import com.ludomancy.gamelib.DialogWidget;
import com.ludomancy.gamelib.Widget;
import com.ludomancy.gamelib.Button.ButtonListener;
import com.ludomancy.gamelib.DialogWidget.DialogListener;

public class MainWidget extends Widget implements DialogListener, ButtonListener
{
	public LandscapeWidget landscape;
	public PhotographyWidget photos;
	public InfoWidget info;
	
	public MainWidget(Widget parent, Rectangle area, int[][] initialSetup, boolean showBriefing)
	{
		super(parent, area);
		info = new InfoWidget(this, new Rectangle(0,0,getWidth() - Game.PHOTO_SIZE*Game.PHOTO_MAX, Game.PHOTO_SIZE));
		photos = new PhotographyWidget(this, new Rectangle(info.getWidth(), 0, getWidth()-info.getWidth(), Game.PHOTO_SIZE));
		landscape = new LandscapeWidget(this, new Rectangle(0, photos.getHeight(), getWidth(), getHeight()));
	}
	
	public void keyPressed(KeyEvent e)
	{
	}

	public void keyReleased(KeyEvent e)
	{
	}

	public void keyTyped(KeyEvent e)
	{
	}
		
	public void update()
	{
		if(Game.game != null)
		{
			Game.game.update();
		}
	}
	
	public void paint(Graphics g)
	{
	}

	public void onPress(Button widget)
	{
	}
	
	public void onDialogClosed(DialogWidget dialog)
	{
	}
}
